<template>
  <div class="FcInputNumber">
    <el-input-number v-bind="attrs" v-model="showValue"></el-input-number>
  </div>
</template>
<script setup name="FcInputNumber">
const attrs = useAttrs();
const emit = defineEmits(['update:modelValue'])
const props = defineProps({
  modelValue: {
    type: [String,
      Number],
    default: ''
  }
})
const showValue = computed({
  get() {
    if(!props.modelValue){
      return undefined
    }
    return props.modelValue?props.modelValue:Number(props.modelValue)
  },
  set(val) {
    emit('update:modelValue',
        val)
  }
})
</script>
<style scoped lang="scss">
.FcInputNumber {
}
</style>
